﻿

CREATE VIEW [dbo].[fares_ViewParteneri]
AS
SELECT     dbo.Parteneri.Denumire, dbo.Parteneri.Strada, dbo.Parteneri.Nr, dbo.Judete.Nume AS Judet, a.Nume AS Localitate, dbo.Parteneri.CodPostal, dbo.Parteneri.Telefon, 
                      dbo.Parteneri.IDPartener, dbo.Parteneri.Fax, dbo.Parteneri.AtributFiscal, dbo.Parteneri.JudetRegComert, dbo.Parteneri.NrRegComert, dbo.Parteneri.AnRegComert, 
                      dbo.Parteneri.NumeDelegat, dbo.Parteneri.SerieAI, dbo.Parteneri.NrAI, dbo.Parteneri.MijlocTransport, dbo.Parteneri.NrMijlocTransport, dbo.Banci.Denumire AS DenumireBanca, 
                      dbo.Parteneri.ContBancar, dbo.Parteneri.CUI
FROM         dbo.Parteneri INNER JOIN
                      dbo.Judete ON dbo.Parteneri.IDJudet = dbo.Judete.IDJudet INNER JOIN
                      dbo.Localitati AS a ON dbo.Parteneri.IDLocalitate = a.IDLocalitate LEFT OUTER JOIN
                      dbo.Banci ON dbo.Parteneri.IDBanca = dbo.Banci.IdBanca